package com.campus.customer.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.campus.customer.entity.User;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 用户表 Mapper 接口
 * </p>
 *
 * @author ZhaoYuJie
 * @since 2025-04-02
 */
public interface UserMapper extends BaseMapper<User> {

    User selectByOpenid(@Param("openid") String openid);

    void deductPoints(@Param("userId") Integer userId, @Param("pointsUsed") Integer pointsUsed);

    void addPoints(@Param("userId") Integer userId, @Param("pointsToAdd") Integer pointsToAdd);
}
